<h1>สมาชิก</h1>
<form method="post" action="users/admin/users/save/<?php echo $user->id?>" id="form" >
<table class="form">
	<tr>
		<th>ระดับผู้ใช้งาน</th>
		<td><?php echo form_dropdown('level_id',get_option('id','level','levels','where id >= '.user()->level_id.' order by id asc'),$user->level_id)?></td>
	</tr>
	<tr>
		<th>อีเมล์</th>
		<td><?php echo form_input('email',$user->email)?></td>
	</tr>
	<tr>
		<th>ชื่อในระบบ</th>
		<td><?php echo form_input('display',$user->display)?></td>
	</tr>
	<tr>
		<th>ชื่อผู้ใช้</th>
		<td><?php echo form_input('username',$user->username)?></td>
	</tr>
	<tr>
		<th>รหัสผ่าน</th>
		<td><?php echo form_password('password',$user->password)?></td>
	</tr>
	<tr>
		<th>ยืนยันรหัสผ่าน</th>
		<td><?php echo form_password('_password',$user->password)?></td>
	</tr>
	<tr>
		<th>ชื่อ-นามสกุล</th>
		<td><?php echo form_input('fullname',$user->fullname)?></td>
	</tr>
	<tr>
		<th>เบอร์โทรศัพท์</th>
		<td><?php echo form_input('telephone',$user->telephone)?></td>
	</tr>
	<?php if(empty($_GET['agency_id'])): ?>
	<tr>
		<th>หน่วยงาน</th>
		<td><?php echo form_dropdown('agency_id',get_option('id','name','content_categories',' where structure_id = 1 order by id asc'),$user->agency_id)?></td>
	</tr>
	<?php endif; ?>
	<tr>
		<th></th>
		<td>
			<?php echo form_submit('',lang('btn_submit'),'class="button"')?>
			<?php echo form_button('',lang('btn_back'),'class="button" onclick="window.location = \'users/admin/users\'"')?>
			<?php if(!empty($_GET['agency_id'])): ?>
			<?php echo form_hidden('agency_id',$_GET['agency_id']) ?>
			<?php endif; ?>
		</td>
	</tr>
</table>
</form>

